package com.lq.ecoldchain.ui.main

import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import com.lq.ecoldchain.base.CommonLoadingViewModel
import com.lq.ecoldchain.base.viewdelegate.BaseLoadingViewDelegate

/*
*2018/12/24 0024  18:01
*function by lq
*/
class MainDelegate(val mainModel: MainModel,val fragmentManager:FragmentManager,val fragments:List<Fragment>,val viewModel: MainViewModel, loadingViewModel: CommonLoadingViewModel):BaseLoadingViewDelegate(loadingViewModel){
//        val adapter by lazy { FragmentViewPagerAdapter(fragmentManager,fragments,mainModel.titles) }
/*
        fun tabSelectChange(){
                tabLayout.addOnTabSelectedListener(object:TabLayout.OnTabSelectedListener{
                        override fun onTabSelected(p0: TabLayout.Tab) {
                                viewPager.currentItem = p0.position
                        }

                        override fun onTabReselected(p0: TabLayout.Tab?) {

                        }

                        override fun onTabUnselected(p0: TabLayout.Tab?) {

                        }
                })
        }

        fun onPageSelectChanged(index:Int){
                for (position in 0..index) {
                       tabLayout.getTabAt(position)!!.select()
                }
        }*/
}